package com.jt.demo24;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Test {
    public static void main(String[] args) {
       ApplicationContext a = new AnnotationConfigApplicationContext(SpringConfig.class);
        User bean = a.getBean(User.class);
        bean.app();
        String name = bean.name();
        System.out.println(name);
    }
}
